#include "cardType.h"
#include "pokerUtil.h"

const ThreeBoom::Type ThreeBoom::getCardType() const
{
	return ThirteenFlush::Type::CT_THREE_BOMB;
}

bool ThreeBoom::CheckType(const std::vector<PokerCard>& CardList)
{
	int countNum = 0;
	std::vector<PokerCard> temp = CardList;
	
	for (int i = 0; i < temp.size(); ++i)
	{
		if ( 4 == pokerUtil::count(temp, temp.at(i)) )
		{
			countNum++;
			temp.at(i).setPokerCardValue(0);
		}
	}

	if (3 == countNum)
	{
		return true;
	}
	else
	{
		return false;
	}
}